C code for PEGetNthTableLogOnInfo and PESetNthTableLogOnInfo

The following code is an example of how to use the PEGetNthTableLogOnInfo and PESetNthTableLogOnInfo functions:

PEGetNthTableLogOnInfo

short            tableN;
struct PELogOnInfo logOnInfo;
tableN = 1;
    // Get information on the second table in the report
    // Initialize size of structure
logOnInfo.StructSize = PE_SIZEOF_LOGON_INFO;
if (!PEGetNthTableLogOnInfo(Job, tableN, &logOnInfo)){
    // Handle error
}

PESetNthTableLogOnInfo

short            tableN;
BOOL        propagate;
struct PELogOnInfo logOnInfo;
tableN = 0;
propagate = False;
    // Log on only valid for the first table.
    // Initialize structure
logOnInfo.StructSize = PE_SIZEOF_LOGON_INFO;
lstrcpy(logOnInfo.ServerName, "Server");
lstrcpy(logOnInfo.DatabaseName, "database");
lstrcpy(logOnInfo.UserID, "user ID");
lstrcpy(logOnInfo.Password, "password");
if (!PESetNthTableLogOnInfo(Job, tableN, &logOnInfo, propagate)){
    // Handle error
}


Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com